<?php
declare (strict_types = 1);

namespace app\model;

use think\model\Pivot;

/**
 * 管理员角色关联模型
 * Class AdminRole
 * @package app\model
 */
class AdminRole extends Pivot
{
    // 表名
    protected $name = 'admin_roles';
    
    // 自动时间戳
    protected $autoWriteTimestamp = 'datetime';
    protected $createTime = 'created_at';
    protected $updateTime = false;
    
    // 字段类型转换
    protected $type = [
        'id' => 'integer',
        'admin_id' => 'integer',
        'role_id' => 'integer',
        'created_at' => 'datetime',
    ];
}